home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2004 E…tra 100 Bedste Programmer / K-CD_2004_Ekstra_100_Gratis_Programmer.iso / Windows / X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Desktop Show Username.xpl < prev    next >
Encoding:
XSetup plugin  |  2004-02-05  |  2.2 KB  |  73 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Desktop\Icons\'My Computer' Options"
  5. "NAME"="Show USERNAME on 'My Computer'"
  6. "VERSION"="2.13"
  7. "OSVERSION"="0101011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Show current username and computer on 'My Computer'"
  10. "DESCRIPTION 1"="If this option is activated, the text below the 'My Computer' icon will display the current username and the name of this computer for example, "JDOW on SERVER". 
  11. "AUTHOR"="Xteq Systems"
  12. "CONTACTURL"="http://www.xteq.com"
  13. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  14. "COMMENT 1"=" "
  15. "COMMENT 2"="Thanks to Hofi [mailto:hofi@mail.ahiv.hu] for the W2K patch! (which doesn't work.....)"
  16. "COMMENT 3"="Thanks to Dan Iorgulescu [mailto:rs2-dani@bx.logicnet.ro] for the working W2K patch!"
  17.  
  18.  
  19. sP="HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\@"
  20. sV="%USERNAME% on %COMPUTERNAME%"
  21.  
  22. 'old
  23. 'sP_W2K="HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\LocalizedString" 
  24. 'sV_W2K="@shell32.dll,-9216@1033, %USERNAME% on %COMPUTERNAME% in %USERDOMAIN%"
  25.  
  26. sP_W2K="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\@"
  27. sV_W2K="%USERNAME% on %COMPUTERNAME% in %USERDOMAIN%"
  28.  
  29.  
  30. Sub Plugin_Initialize 
  31.     if GetWinVer=2 then
  32.        s=RegReadValue(sP)
  33.        if s=sV then SetUIElement 1,true
  34.     else
  35.        s=RegReadValue(sP_W2k)
  36.        if s=sV_w2k then SetUIElement 1,true
  37.     end if
  38. End Sub
  39.  
  40. Sub Plugin_CheckData(ElementIndex)
  41. End Sub
  42.  
  43. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  44.  
  45.  b=GetUIElement(1)
  46.  if b=true then
  47.     if GetWinVer=2 then
  48.        Call RegWriteValue(sP,sV,4)
  49.     else
  50.        Call RegWriteValue(sP_W2k,sV_w2k,4)
  51.     end if
  52.  else
  53.     'back to default
  54.     if GetWinVer=2 then 'WNT
  55.        s=RegReadValue(sP)
  56.        if ucase(s)=ucase(sV) then  'okay, changed: FIX IT! 
  57.           Call RegWriteValue(sP,"My Computer",1)
  58.        end if
  59.     else 'W2K
  60.        s=RegReadValue(sP_w2k)
  61.        if ucase(s)=ucase(sV_w2k) then 'okay, changed: FIX IT! 
  62.           Call RegWriteValue(sP_w2k,"My Computer",1)
  63.        end if
  64.     end if    
  65.  end if
  66.  
  67.  
  68.  Call Logoff()
  69. End Sub
  70.  
  71. Sub Plugin_Terminate 
  72. End Sub
  73.